#include "math_f.h"

/** \class fraction
	\brief Class representing fractions
*/

class fraction
{
    public:
    long long p; /**< Numerator of a fraction */
    long long q; /**< Denominator of a fraction */

/*! \brief Simplifies the fraction.
*
*Simplifies the fraction by dividing its numerator and denominator by theirs greatest common divisor.
*/
    void simplify();
/** \brief Prints the fraction
*/
    void print();
/** \brief Square root of a fraction
*/
double fr_sqrt();
/** \brief Fraction constructor.
*/
    fraction(long long p,/**< Long long value that will become the numerator of the fraction */ long long q=1/**< Long long value that will become the denominator of the fraction */);

/** \brief Add fractions.
*/
    fraction operator+(fraction a);
/** \brief Substract fractions.
*/
    fraction operator-(fraction a);
/** \brief Multiply fractions.
*/
    fraction operator*(fraction a);
/** \brief Multiply fraction by a number.
*/
	fraction operator*(long long a);
/** \brief Divide fractions.
*/
    fraction operator/(fraction a);
};
